package com.lmqb.util;

import org.apache.poi.ss.usermodel.Workbook;
import org.jeecgframework.poi.excel.ExcelExportUtil;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;

import java.util.List;
/**
 * 导表工具类
 * @author LiuQianQian
 * 2017年9月14日 下午2:37:47
 */
public class ExportUtil {
    /**
     * @Purpose   导出工具包
     * @param     c  list(用户名称)
     * @version   1.0
     * @return    Workbook
     */
    public static Workbook exportExcel(String title, Class<?> c, List<?> list){
        ExportParams exportParams = new ExportParams();
        exportParams.setTitle(title);
        exportParams.setType(ExcelType.XSSF);
        Workbook workbook = ExcelExportUtil.exportExcel(exportParams, c, list);
        return workbook;
    }
}
